package com.yunfangdata.service.impl;

import com.yunfangdata.domain.RecruitPlanDetail;
import com.yunfangdata.mapper.RecruitPlanDetailMapper;
import com.yunfangdata.query.QueryObject;
import com.yunfangdata.service.IStaffNeedsService;
import com.yunfangdata.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StaffNeedsServiceImpl implements IStaffNeedsService {


    @Autowired
    private RecruitPlanDetailMapper mapper;


    public PageResult queryAllitems(QueryObject qo) {
        int total = mapper.queryForItemsCount(qo);

        if (total == 0){
            return new PageResult();
        }
        List<RecruitPlanDetail> rows = mapper.queryForItemsList(qo);
        return new PageResult(total,rows);
    }


}
